package com.serviceImpl;

import com.dao.AuthGroupDao;
import com.model.AuthGroup;
import com.model.Manager;
import com.service.AuthGroupService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: AuthGroupServiceImpl
 * @Description: 权限管理分组（角色管理）服务层实现类
 * @author 陈靖
 * @date 2017-1-17 上午11:48:13
 */
@Service
public class AuthGroupServiceImpl implements AuthGroupService {
	@Resource
	private AuthGroupDao authGroupDao;

	/*
	 * Title: getAuthGroupList Description: 获取管理权限分组列表
	 * 
	 * @return List<AuthGroup>
	 * 
	 * @see com.service.AuthGroupService#getAuthGroupList()
	 */
	public List<AuthGroup> getAuthGroupList() {
		return authGroupDao.getAuthGroupList();
	}

	/*
	 * Title: insertAuthGroup Description: 新增管理权限分组
	 * 
	 * @param authGroup
	 * 
	 * @return int
	 * 
	 * @see com.service.AuthGroupService#insertAuthGroup(com.model.AuthGroup)
	 */
	public int insertAuthGroup(AuthGroup authGroup) {
		return authGroupDao.insertAuthGroup(authGroup);
	}

	/*
	 * Title: deleteAuthGroup Description: 删除管理权限分组
	 * 
	 * @param authGroup
	 * 
	 * @return int
	 * 
	 * @see com.service.AuthGroupService#deleteAuthGroup(com.model.AuthGroup)
	 */
	public int deleteAuthGroup(AuthGroup authGroup) {
		return authGroupDao.deleteAuthGroup(authGroup);
	}

	/*
	 * Title: modifyAuthGroupRules Description: 修改管理权限规则
	 * 
	 * @param authGroup
	 * 
	 * @return
	 * 
	 * @see
	 * com.service.AuthGroupService#modifyAuthGroupRules(com.model.AuthGroup)
	 */
	public int modifyAuthGroupRules(AuthGroup authGroup) {
		return authGroupDao.modifyAuthGroupRules(authGroup);
	}

	public List<AuthGroup> getRulesbyuid(Manager manager) {
		return authGroupDao.getRulesbyuid(manager);
	}

}
